import request from '@/router/axios';
/**
 *
 * 维修执行接口大全
 */
export const getList = (params) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/repair-list',
    method: 'get',
    params: {
      ...params
    }
  });
};

export const getPageList = (current, size, params) => {
  return request({
    url: '/api/mes-product/mro-repair-confirm/page',
    method: 'get',
    params: {
      current,
      size,
      ...params
    }
  });
};

export const getRepairStatistics = (params) => {
  return request({
    url: '/api/mes-product/mro-repair-confirm/today-statistics',
    method: 'get'
  });
};

export const getDetail = (id) => {
  return request({
    url: '/api/mes-product/mro/centerproduct/detail',
    method: 'get',
    params: {
      id
    }
  });
};

export const setColor = (data) => {
  return request({
    url: '/api/mes-product/mro/color/submit',
    method: 'post',
    data
  });
};

export const getColor = (data) => {
  return request({
    url: '/api/mes-product/mro/color/list',
    method: 'get'
  });
};
